package net.sxnic.workflow.chart.action;

import java.util.List;

import net.sxnic.workflow.chart.PlumbChartNode;



@SuppressWarnings("serial")
public class View extends ChartAction {

	public String execute() throws Exception {
		
		total ="2";
		System.out.println("==View=="+nodeList.size());
		if(nodeList ==null || nodeList.size()==0){
			//list = new ArrayList<PlumbChartNode>();
			PlumbChartNode p = new PlumbChartNode();
			p.setId("1");
			p.setLeft(20);
			p.setTop(80);
			p.setPrcs_content("拟稿");
			p.setPrcs_type("start");
			p.setPrcs_id("1");
			p.setTitle("xxx yyyy-MM-dd HH:ss 办理");
			p.setTo("2,4");
			
			nodeList.add(p);
			
			
			p = new PlumbChartNode();
			p.setId("2");
			p.setLeft(20);
			p.setTop(180);
			p.setPrcs_content("审定");
			p.setPrcs_type("start");
			p.setPrcs_id("2");
			p.setTitle("xxx yyyy-MM-dd HH:ss 办理");
			p.setTo("3");
			
			nodeList.add(p);
			
			p = new PlumbChartNode();
			p.setId("3");
			p.setLeft(20);
			p.setTop(280);
			p.setPrcs_content("归档");
			p.setPrcs_type("start");
			p.setPrcs_id("3");
			p.setTitle("xxx yyyy-MM-dd HH:ss 办理");
			p.setTo("0");
			
			nodeList.add(p);
			
			p = new PlumbChartNode();
			p.setId("4");
			p.setLeft(220);
			p.setTop(180);
			p.setPrcs_content("归档");
			p.setPrcs_type("start");
			p.setPrcs_id("4");
			p.setTitle("xxx yyyy-MM-dd HH:ss 办理");
			p.setTo("0");
			
			nodeList.add(p);	
		}
		
		list = nodeList;		
		
		return SUCCESS;
	}
	
	
	private String total;
	
	private List<PlumbChartNode> list;
	
	public String getTotal() {
		return total;
	}
	public void setTotal(String total) {
		this.total = total;
	}
	public List<PlumbChartNode> getList() {
		return list;
	}
	public void setList(List<PlumbChartNode> list) {
		this.list = list;
	}
	


}
